/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 索韬用户表Entity
 * @author HOHD
 * @version 2020-12-09
 */
@Table(name="st_phone", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="phonename", attrName="phonename", label="phonename"),
		@Column(name="user_id", attrName="userId.id", label="user_id"),
	}, orderBy="a.id ASC"
)
public class StPhone extends DataEntity<StPhone> {
	
	private static final long serialVersionUID = 1L;
	private String phonename;		// phonename
	private StUser userId;		// user_id 父类
	
	public StPhone() {
		this(null);
	}


	public StPhone(StUser userId){
		this.userId = userId;
	}
	
	@Length(min=0, max=10, message="phonename长度不能超过 10 个字符")
	public String getPhonename() {
		return phonename;
	}

	public void setPhonename(String phonename) {
		this.phonename = phonename;
	}
	
	@Length(min=0, max=36, message="user_id长度不能超过 36 个字符")
	public StUser getUserId() {
		return userId;
	}

	public void setUserId(StUser userId) {
		this.userId = userId;
	}
	
}